package com.xyd.service;

import com.xyd.util.OutOfStockException;

public class PhoneBizProxyImpl implements PhoneBiz {
    PhoneBizImpl phoneBiz = new PhoneBizImpl();
    LogUtil logUtil = new LogUtil();

    @Override
    public void buyPhone(int num) {
        phoneBiz.buyPhone(num);
        logUtil.log("购买", 100);
    }

    @Override
    public void salPhone(int num) throws OutOfStockException {
        phoneBiz.salPhone(num);
        logUtil.log("销售", 50);
    }
}
